package jiachunlei.factory.lesson2;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/12/1 19:47
 */
public class SqrtOperator extends Operator<Double>
{
    @Override
    Double getResult(Double... args)
    {
        if (args != null && args.length >= 1)
        {
            return Math.sqrt(args[0]);
        } else
        {
            throw new RuntimeException("Params Number Error " + args.length);
        }
    }
}
